﻿<%@ Page Title="Offers Posted - Savory Housing" Language="C#" MasterPageFile="~/RealState.Master"
    AutoEventWireup="true" CodeBehind="Offers_Posted.aspx.cs" Inherits="WebApplication.Offers_Posted"
    EnableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#<%=ddlProperty.ClientID%>').change(getProperty);
            $('#<%=ddlPropertyType.ClientID%>').append(new Option('Select Property Type', 'Select Property Type', false));

            $(":input[title]").each(function () {
                $(this).val($(this).attr("title"));
                $(this).bind('focus', function () {
                    if ($(this).val() == $(this).attr("title")) $(this).val('');
                });
                $(this).bind('blur', function () {
                    if ($(this).val() == '') $(this).val($(this).attr("title"));
                });
            });

        });
            
        function getProperty() {
            $("select[id$=ddlPropertyType] > option").remove();
            $('#<%=ddlPropertyType.ClientID%>').append(new Option('Select Property Type', 'Select Property Type', false));
            $.ajax({
                type: "POST",
                url: "/CountryService.asmx/GetPropertyType",
                data: "{Property: '" + $('#MainContent_ddlProperty').val() + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (response) {
                    if ($('#<%=ddlProperty.ClientID%>').val() == "All") {
                        $('#MainContent_ddlPropertyType').attr("disabled", true);
                    }
                    else {
                        $('#MainContent_ddlPropertyType').attr("disabled", false);
                    }
                    var models = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
                    for (var i = 0; i < models.length; i++) {

                        var val = models[i];
                        var text = models[i];
                        $('#MainContent_ddlPropertyType').append(new Option(text, val, false));
                    }


                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                }

            });
        }
        function checkPageValidity() {
            var PropertyType = document.getElementById('MainContent_ddlPropertyType');
            var Property = document.getElementById('MainContent_ddlProperty');
            if (Property.value == 'All') {
                return true;
            }
            else {
                if ((Property.value == 'Select Property' || Property.selectedIndex == 0) || (PropertyType.value == 'Select Property Type' || PropertyType.selectedIndex == 0)) {
                    document.getElementById('div_Property').style.display = "block";
                    return false;
                }
                else {

                    document.getElementById('div_Property').style.display = "none";
                    return true;
                }
            }
            return true;        
}
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!--Slider-->
    <div class="slider_container">
        <div class="slider_container_head">
            Featured Real Estate</div>
        <div id="gallery">
            <script type="text/javascript">

                stepcarousel.setup({
                    galleryid: 'mygallery', //id of carousel DIV
                    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
                    panelclass: 'panel', //class of panel DIVs each holding content
                    autostep: { enable: false, moveby: 1, pause: 3000 },
                    panelbehavior: { speed: 2000, wraparound: true, wrapbehavior: 'slide', persist: true },
                    defaultbuttons: { enable: true, moveby: 5, leftnav: ['../images/leftnav.jpg', -4, 0], rightnav: ['../images/rightnav.jpg', 0, 0] },
                    statusvars: ["startA", "startB", "total"],
                    onslide: function () {
                        window.status = "Currently showing panels " + startA + " through " + startB
                    }, //register 3 variables that contain current panel (start), current panel (last), and total panels
                    contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
                })

            </script>
            <div class="countdown">
                <a href="javascript:stepcarousel.stepBy('mygallery', -5)">
                    <img src="../images/gr-l_ar.jpg" alt="" border="0" align="top" /></a> &nbsp;
                Page <b><span id="startB"></span></b>of <b><span id="total"></span></b>&nbsp; <a
                    href="javascript:stepcarousel.stepBy('mygallery', 5)">
                    <img src="../images/gr-r_ar.jpg" alt="" border="0" align="top" /></a>
            </div>
            <div id="mygallery" class="stepcarousel">
                <div class="belt">
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img1.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img2.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img2.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img1.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--Slider-->
    <%--<h3 id="Header" class="white_db_box nfont" runat="server" style="">Saudi Arabia - Damman</h3>--%>
    <h4 style="font-weight:normal; width: 293px;" id="Header" runat="server"></h4>
    <div class="clear">
    </div>
    <div class="pd-l10">
        <div class="res_c1 purple">
            Offers Posted:</div>
        <div class="res_ad">
            <asp:DropDownList ID="ddlProperty" runat="server" CssClass="form-text">
            </asp:DropDownList>
            <br />
        </div>
        <div class="res_ad">
            <asp:DropDownList ID="ddlPropertyType" runat="server" CssClass="form-text">
            </asp:DropDownList>
        </div>
        <div class="res_ad">
            <asp:DropDownList ID="ddlBuyerType" runat="server" CssClass="form-text">
                <asp:ListItem Text="All" />
                <asp:ListItem Text="Buy" />
                <asp:ListItem Text="Rent" />
            </asp:DropDownList>
        </div>
        <div class="clear">
        </div>
        <div class="error_msg" id="div_Property" style="display: none;">
            <label class="errmsg_lbl">
                Please select property and property type.
            </label>
        </div>
        <br />
        <div style="margin: 0px 0px 0px 100px;">
            <asp:Button ID="cmdSearch" runat="server" Text="Continue" OnClick="cmdSearch_Click"
                CssClass="reg-blue-round-btn w100" OnClientClick="return checkPageValidity();" />
        </div>
        <div class="clear">
        </div>
    </div>
    </div>
</asp:Content>
